#include <iostream>
#include <string>
using namespace std;

#include "Singleton/singleton.h"
#include "reflect/A.h"
#include "reflect/B.h"
#include "reflect/ClassFactory.h"
#include "reflect/ClassObject.h"
#include "reflect/IClassObject.h"
using namespace bin;


int main()
{
    ClassFactory* factory = Singleton<ClassFactory>::GetInstance();
    ClassObject*  a       = factory->getClass("A");
    a->show();

    std::string name;
    a->getField("m_name", name);
    a->setField("m_name", "成员域名");
    a->getField("m_name", name);

    int age;
    a->getField("m_age", age);
    a->setField("m_age", 18);
    a->getField("m_age", age);

    a->classMethodCall("testfun1");
    a->classMethodCall("testfun2");
    a->getClassMethod(1);

    return 0;
}